<template>
  <div class="flex-box">
  </div>
</template>

<script>
export default {
  data() {
    return {               
      list:[
        { id: 22200, parentId: 21011, name: 'test6', type: 'js', size: 1024, date: '2021-06-01' },
        { id: 22201, parentId: 21011, name: 'test7', type: 'js', size: 1024, date: '2021-06-01' },
        { id: 22202, parentId: 21011, name: 'test8', type: 'js', size: 1024, date: '2021-06-01' },
        { id: 23671, parentId: 23677, name: 'test11', type: 'js', size: 1024, date: '2021-06-01' },   // 1
        { id: 23672, parentId: 23677, name: 'test12', type: 'js', size: 1024, date: '2021-06-01' },
        { id: 23681, parentId: 23688, name: 'test14', type: 'js', size: 1024, date: '2021-06-01' },
        { id: 23682, parentId: 23688, name: 'test15', type: 'js', size: 1024, date: '2021-06-01' },
        { id: 24566, parentId: 24555, name: 'test16', type: 'js', size: 1024, date: '2021-06-01' },   // 2
        { id: 24577, parentId: 24555, name: 'test17', type: 'js', size: 1024, date: '2021-06-01' }
      ],
      list2: [
        { id: 23671, parentId: 23677, name: 'test11', type: 'js', size: 1024, date: '2021-06-01' },  // 1
        { id: 23672, parentId: 23677, name: 'test12', type: 'js', size: 1024, date: '2021-06-01' },   
        { id: 24566, parentId: 24555, name: 'test16', type: 'js', size: 1024, date: '2021-06-01' },  // 2
        { id: 24577, parentId: 24555, name: 'test17', type: 'js', size: 1024, date: '2021-06-01' }
      ]
    };
  },
  created(){
      this.deleTest()
  },
  mounted() {

  },
  methods: {
      deleTest(){
         debugger;
         let testList = []; 
         testList = this.list;
         let testList2 = [];
         testList2 = this.list2;
         for (let i = 0; i < testList.length; i++) {
            for (let j = 0; j < testList2.length; j++) {
                if (testList[i].id === testList2[j].id) {
                    this.list.splice(i,1);
                    this.list2.splice(j,1);
                    i--;
                    j--;
                }
            }
         }
         console.log('剩余1',this.list);
         console.log('剩余2',this.list2);
      }
  }
};
</script>

<style scoped>
</style>